package studay.decorator;

/**
 * @program: 设计模式
 * @description: RSC 防爆胎，角色 ConcreteDecorator
 * @author: Tom
 * @create: 2022-01-07 12:28
 **/
public class RSCBikeDecorator extends BikeDecorator{

    private String description = "增加一个防爆胎";

    private Bike bike;

    public RSCBikeDecorator(Bike bike){
        this.bike = bike;
    }
    @Override
    public String getDescription() {
       return bike.getDescription()+"," +description;
    }

    /**
     * 100是防爆胎的价格
     * @return
     */
    @Override
    public int getPrice() {
        return bike.getPrice()+100;
    }
}
